package com.orphan.marketFront.util;

public enum ResultCode {
    SUCCESS(0,"成功"),
    // 参数错误1001-1999
    PARAM_IS_INVALID(1001,"参数无效"),
    PARAM_IS_BLANK(1002,"参数为空"),
    PARAM_TYPE_BAND_ERROR(1003,"参数类型错误"),
    PARAM_NOT_COMPLETE(1004,"参数缺失"),
    PARAM_NUMBER_MISS(1005,"参数个数不匹配"),
    // 用户错误2001-2999
    USER_NOT_LOGGED_IN(2001,"用户未登录"),
    USER_LOGIN_ERROR(2002,"账户不存在或密码错误"),
    USER_ACCOUNT_FORBIDDEN(2003,"账户已被禁用"),
    USER_NOT_EXIST(2004,"用户不存在"),
    USER_HAS_EXISTED(2005,"用户已存在"),
    USER_PASS_ERROR(2006,"密码错误"),
    GET_RETURNS_FAILED(280,"获取退货信息失败"),
    ORDER_QUERY_ERROR(290,"无此订单"),
    // 服务器错误3001-3999
    ORDER_REMOVE_ERROR(300,"删除订单失败"),
    ORDER_DETAIL_ERROR(340,"无此订单详情"),
    RETURNS_CHECK_SUCCESS(310,"退货中..."),
    RETURNS_CHECK_FAILED(330,"退货失败，下单时间已超过七天");


    private Integer code;
    private String message;
    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code(){

        return this.code;
    }
    public String message(){
        return this.message;
    }
}
